<%-- 
    Document   : sanphamtheoloaicontent
    Created on : Oct 7, 2011, 6:45:21 PM
    Author     : Administrator
--%>

<%@page import="java.util.List"%>
<%@page import="hibernate.pojo.Sanpham"%>
<%@page import="org.hibernate.HibernateException"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<div class="hastable">
    <form name="myform" class="pager-form" method="post" action="admindealprocesscontroller?action=addingdeal">
        <table id="sort-table"> 
            <thead> 
                <tr>
                    <th><input type="checkbox" value="check_none" onclick="this.value=check(this.form.list)" class="submit"/></th>
                    <th>Tên Sản Phẩm</th>
                    <th style="width:132px">Tùy Chỉnh</th>
                    
                </tr>
            </thead> 
            <tbody>
<%
    try
    {
        List<Sanpham> arrSanPham = (List<Sanpham>)request.getAttribute("DanhSachSanPhamTheoLoai");
        if(arrSanPham!=null)
        {
            for(int i=0; i<arrSanPham.size(); i++)
            {
                Sanpham sanpham = arrSanPham.get(i);
                
%>                
                <tr>
                    <td class="center"><input type="checkbox" value="1" name="list" class="checkbox"/></td> 
                    <td><%=sanpham.getTenSanPham()%></td>
                    <td>
                        <a class="btn_no_text btn ui-state-default ui-corner-all tooltip" title="Cập nhật" href="admindealprocesscontroller?action=updatingdeal&masanpham=<%=sanpham.getMaSanPham()%>">
                            <span class="ui-icon ui-icon-wrench"></span>
                        </a>
                        <a class="btn_no_text btn ui-state-default ui-corner-all tooltip" title="Chi tiết sản phẩm" href="admindealdetailcontroller?action=view&masanpham=<%=sanpham.getMaSanPham()%>">
                            <span class="ui-icon ui-icon-heart"></span>
                        </a>
                        <a class="btn_no_text btn ui-state-default ui-corner-all tooltip" title="Add to shopping card example" href="#">
                            <span class="ui-icon ui-icon-cart"></span>
                        </a>
                        <a class="btn_no_text btn ui-state-default ui-corner-all tooltip" title="Xóa" href="#">
                            <span class="ui-icon ui-icon-circle-close"></span>
                        </a>
                    </td>
                </tr>
<%                    
            }
        }
    }
    catch(HibernateException ex)
    {
        out.println(ex);
    }
%>                
            </tbody>
        </table>
    </form>
    <div align="right">
        <form id="form1" name="form1" method="post" action="admindealprocesscontroller?action=addingdeal">
            <input type="submit" name="button" id="button" value="Thêm Sản Phẩm >>"  style="background:url(Admin/images/icons/btnThem.gif) no-repeat;"/>
        </form>
    </div>
    <div class="title title-spacing"><h3>Danh sách trang</h3></div>
    <ul class="pagination">
        <li class="previous-off">&laquo;Previous</li>
        <li class="active">1</li>
        <li><a href="#">2</a></li>
        <li><a href="#">3</a></li>
        <li>...........</li>
        <li><a href="#">7</a></li>
        <li><a href="#">8</a></li>
        <li><a href="#">9</a></li>
        <li><a href="#">10</a></li>
        <li class="next"><a href="#">Next &raquo;</a></li>
    </ul>
</div>
